<?php

use think\facade\Route;

/**
 * 课程学习证书配置
 */
Route::group('admin/cert', function () {
    // 证书样式配置
    Route::get('config', '@index');
    Route::post('config', '@index');
    // 课程证书获取配置数据
    Route::get('<course_id>/config', '@courseCertConfig')->pattern(['course_id' => '\d+']);
    Route::post('<course_id>/config', '@courseCertConfig')->pattern(['course_id' => '\d+']);
})->prefix('\app\course\service\cert\admin\Config')->middleware(['adminRoute']);

Route::group('admin/cert', function () {
    // 课程证书学员
    Route::get('<course_id>/course/student', '@courseStudent')->pattern(['course_id' => '\d+']);
    // 打印证书
    Route::get('print', '@printData');
})->prefix('\app\course\service\cert\admin\Cert')->middleware(['adminRoute']);

/* 证书 */
Route::group('base/student', function () {
    Route::get('cert$', '@getMyCert');
    Route::get('cert/detail$', '@getCertDetail');
})->prefix('\app\course\service\cert\Cert');